package com.rongmai.web.ctrl;

import com.rongmai.db.model.BaseResult;
import com.rongmai.db.model.HotLink;
import com.rongmai.web.bo.HotLinkBo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@RestController
@RequestMapping("/hotlink")
public class HotLinkCtrl {

    @Resource
    private HotLinkBo hotLinkBo;

    @RequestMapping("query")
    public BaseResult<List<HotLink>> query(String role) {
        return BaseResult.succ(hotLinkBo.query(role));
    }
}
